﻿// ================================================================================
//        File: EshopConfigInfo.cs
//        Desc: 序列化和反序列化来保存程序配置的实体类
//        Auth: Alex
//        Date: 2010-09-23
// ================================================================================
//        Change History
// ================================================================================
//        Date:         Author:                  Description:
//        --------     --------              -------------------
//              
// ================================================================================


using System;
using EShop.Common;

namespace EShop.Model
{
    [Serializable]
    public class EshopConfigInfo
    {
        private string _LoginID;
        private string _LoginPWD;
        private int _PageSize = 10;
        private bool _AutoLogin;

        [NonSerialized] 
        private string _EmployeeFullName;

        [NonSerialized] 
        private string _LastLoginTime;

        [NonSerialized] 
        private PermissionEnum _Permission;

        /// <summary>
        /// 登陆用户名
        /// </summary>
        public string LoginID
        {
            get { return _LoginID; }
            set { _LoginID = value; }
        }

        /// <summary>
        /// 登陆密码
        /// </summary>
        public string LoginPWD
        {
            get { return _LoginPWD; }
            set { _LoginPWD = value; }
        }

        /// <summary>
        /// 是否自动登陆
        /// </summary>
        public bool AutoLogin
        {
            get { return _AutoLogin; }
            set { _AutoLogin = value; }
        }

        /// <summary>
        /// PageSize
        /// </summary>
        public int PageSize
        {
            get
            {
                return _PageSize;
            }
            set { _PageSize = value; }
        }
        
        /// <summary>
        /// 最后登陆时间
        /// </summary>
        public string LastLoginTime
        {
            get { return _LastLoginTime; }
            set { _LastLoginTime = value; }
        }

        /// <summary>
        /// 用户权限
        /// </summary>
        public PermissionEnum Permission
        {
            get { return _Permission; }
            set { _Permission = value; }
        }

        /// <summary>
        /// 登陆用户姓名
        /// </summary>
        public string EmployeeFullName
        {
            get { return _EmployeeFullName; }
            set { _EmployeeFullName = value; }
        }

        private bool _AutoCheckOverTime = false;
        /// <summary>
        /// 是否在启动时检查逾期
        /// </summary>
        public bool AutoCheckOverTime
        {
            get { return _AutoCheckOverTime; }
            set { _AutoCheckOverTime = value; }
        }

        private bool _AutoCheckLowStock = false;
        /// <summary>
        /// 登陆时是否自动检测低量商品
        /// </summary>
        public bool AutoCheckLowStock
        {
            get { return _AutoCheckLowStock; }
            set { _AutoCheckLowStock = value; }
        }

        private bool _AutoCheckBrithday = false;
        /// <summary>
        /// 登陆时是否自动检测生日
        /// </summary>
        public bool AutoCheckBrithday
        {
            get { return _AutoCheckBrithday; }
            set { _AutoCheckBrithday = value; }
        }

        private bool _AutoPrintBill = false;
        /// <summary>
        /// 打印小票
        /// </summary>
        public bool AutoPrintBill
        {
            get { return _AutoPrintBill; }
            set { _AutoPrintBill = value; }
        }

        private string _Skin;

        public string Skin
        {
            get { return _Skin; }
            set { _Skin = value; }
        }

    }
}
